{% load debate_tags participant_link i18n %}

{# Round start time #}
{% if current_round.starts_at %}
  <div class="list-group-item">
    {% blocktrans trimmed with start_time=current_round.starts_at %}
      The round begins at {{ start_time }}
    {% endblocktrans %}
  </div>
{% endif %} {# current_round.starts_at #}

{# Teams (only in BP -- in two-team, it's displayed above) #}
{% if pref.teams_in_debate == 'bp' %}
  <div class="list-group-item">
    <strong>{% trans "Teams:" %}</strong>
    {% for dt in debate.debateteams_ordered %}
      {% team_record_link dt.team admin_page tournament %}{% if debate.sides_confirmed %} ({% debate_team_side_name dt tournament %}){% endif %}{% if not forloop.last %},{% endif %}
    {% endfor %}
  </div>
{% endif %} {# pref.teams_in_debate == 'bp' #}

{# Adjudicators #}
{% if not pref.no_panellist_position or not pref.no_trainee_position %}
  <div class="list-group-item">
    {% if debate.adjudicators|length > 1 %}
      {% with adjudicators=debate.adjudicators %}
        <strong>
          {% blocktrans trimmed count counter=adjudicators|length %}
            Adjudicator:
          {% plural %}
            Adjudicators:
          {% endblocktrans %}
        </strong>
        {% for adj, adjtype in adjudicators.with_positions %}
          {% if adj != debateadjudicator.adjudicator %}
            <a href="{% adj_record_link adj admin_page tournament %}">
              {{ adj.name }}</a>{% if adjtype == adjudicators.POSITION_CHAIR %}&nbsp;{% trans "Ⓒ" context "chair icon" %}{% elif adjtype == adjudicators.POSITION_TRAINEE %}&nbsp;{% trans "Ⓣ" context "trainee icon" %}{% endif %}{% if not forloop.last %},{% endif %}
          {% else %}
            {{ adj.name }}{% if adjtype == adjudicators.POSITION_CHAIR %}&nbsp;{% trans "Ⓒ" context "chair icon" %}{% elif adjtype == adjudicators.POSITION_TRAINEE %}&nbsp;{% trans "Ⓣ" context "trainee icon" %}{% endif %}{% if not forloop.last %},{% endif %}
          {% endif %}
        {% endfor %}
      {% endwith %}
    {% else %}
      <em>{% trans "There are no panellists or trainees assigned to this debate." %}</em>
    {% endif %} {# debate.adjudicators|length > 1 #}
  </div>
{% endif %} {# not pref.no_panellist_position or not pref.no_trainee_position #}

{# Motions #}
{% if pref.public_motions or admin_page %}
  <div class="list-group-item {% if not pref.public_motions or not current_round.motions_released %}list-group-item-dark{% endif %}">
    {% if current_round.motions_released or admin_page %}
      {% if not current_round.motions_released %}
        <em>{% trans "Motions are not released to public." %}</em><br />
      {% endif %}
      {% if debate.round.motion_set.all|length == 1 %}
        <strong>{% trans "Motion:" %}</strong> {{ debate.round.motion_set.first.text }}
      {% else %}
        {% for rm in debate.round.roundmotion_set.all %}
          <strong>
            {% blocktrans trimmed with seq=rm.seq %}
              Motion {{ seq }}:
            {% endblocktrans %}
          </strong>
          {{ rm.motion.text }}<br />
        {% endfor %}
      {% endif %}
    {% else %} {# elif not (current_round.motions_released or admin_page) #}
      <em>{% trans "The motion(s) for this round haven't yet been released." %}</em>
    {% endif %} {# current_round.motions_released or admin_page #}
  </div>
{% endif %} {# pref.public_motions or admin_page #}
